import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '机构编码',
    align: "center",
    dataIndex: 'sysOrgCode'
  },
  {
    title: '项目名称',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '夜班费用',
    align: "center",
    dataIndex: 'fee'
  },
  {
    title: '是否夜班',
    align: "center",
    dataIndex: 'status_dictText'
  },
  {
    title: '是否节假日',
    align: "center",
    dataIndex: 'isFestival_dictText'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "机构编码",
    field: 'sysOrgCode',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "项目名称",
    field: 'name',
    component: 'Input',
    //colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '项目名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '夜班费用',
    field: 'fee',
    component: 'Input',
  },
  {
    label: '是否夜班',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
  },
  {
    label: '是否节假日',
    field: 'isFestival',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  sysOrgCode: {title: '机构编码',order: 0,view: 'text', type: 'string',},
  name: {title: '项目名称',order: 1,view: 'text', type: 'string',},
  fee: {title: '夜班费用',order: 2,view: 'text', type: 'string',},
  status: {title: '是否夜班',order: 3,view: 'list', type: 'string',dictCode: 'yn',},
  isFestival: {title: '是否节假日',order: 4,view: 'list', type: 'string',dictCode: 'yn',},
};
